package com.zjcode.cdcer.controller;

import com.chinatechstar.component.commons.controller.BaseController;
import com.chinatechstar.component.commons.supports.PageData;
import com.zjcode.cdcer.model.basic.JsonObj;
import com.zjcode.cdcer.service.ZjcodeSelfTestInfoService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @createTime: 2023-09-15
 * @功能：风险因素表
 * @creater: yong
 */
@RestController
@Slf4j
@RequestMapping("/v1/riskfactor/")
public class TkmCerRiskFactorController extends BaseController {
    @Autowired
    private ZjcodeSelfTestInfoService zjcodeSelfTestInfoService;
    @PostMapping("/listAllData")
    @ApiOperation("获取所有的风险因素表数据")
    public JsonObj listAllData() {
        return zjcodeSelfTestInfoService.listAllData(getPageData());
    }
    @GetMapping("getContentById")
    @ApiOperation("获取风险因素表原始数据")
    public JsonObj getContentById() {
        PageData pageData = getPageData();
        return zjcodeSelfTestInfoService.getContentById(pageData);
    }
}
